'\" te
.\"  Copyright (c) 1996, Sun Microsystems, Inc.  All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH EUCLEN 3C "Dec 20, 1996"
.SH NAME
euclen, euccol, eucscol \- get byte length and display width of EUC characters
.SH SYNOPSIS
.LP
.nf
#include <euc.h>

\fBint\fR \fBeuclen\fR(\fBconst unsigned char *\fR\fIs\fR);
.fi

.LP
.nf
\fBint\fR \fBeuccol\fR(\fBconst unsigned char *\fR\fIs\fR);
.fi

.LP
.nf
\fBint\fR \fBeucscol\fR(\fBconst unsigned char *\fR\fIstr\fR);
.fi

.SH DESCRIPTION
.sp
.LP
The \fBeuclen()\fR function returns the length in bytes of the Extended Unix
Code (EUC) character pointed to by \fIs\fR, including single-shift characters,
if present.
.sp
.LP
The \fBeuccol()\fR function returns the screen column width of the \fBEUC\fR
character pointed to by \fIs\fR.
.sp
.LP
The \fBeucscol()\fR function returns the screen column width of the \fBEUC\fR
string pointed to by \fIstr\fR.
.sp
.LP
For the \fBeuclen()\fR and \fBeuccol()\fR, functions, \fIs\fR points to the
first byte of the character. This byte is examined to determine its codeset.
The character type table for the current \fIlocale\fR is used for codeset byte
length and display width information.
.SH USAGE
.sp
.LP
These functions will work only with \fBEUC\fR locales.
.sp
.LP
These functions can be used safely in multithreaded applications, as long as
\fBsetlocale\fR(3C) is not called to change the locale.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
MT-Level	MT-Safe with exceptions
.TE

.SH SEE ALSO
.sp
.LP
.BR getwidth (3C),
.BR setlocale (3C),
.BR attributes (7)
